Wind Sensor
=Wind Sensor= Note for Joey: Wrote a bunch, wiki didn't save it, to sum up: read this. Find out if we can send data from physical sesnor to Arduino, without using the combiner. We need RS-232 or (if possible TTL) logic to the Arduino, so we need to figure out what is coming from top of mast, and how to convert it. We have an opto-isolator in our combiner, that is between the sensor and the NMEA IN A and B ports on the combiner. which apparently converts to RS232. As of summer 2011 the combiner was completely removed to simplifiy things as we were not using any of its features. The Wind Sensor communicates in RS422, but this is compatible with RS232 as shown here. This also allows us to talk back to the wind sensor, as well as eliminate the power needed for the opto-isolator. The converter is now in storage. The currently enabled messages are: In addition it is possible to change the rate of transmission and to enable/disable strings by sending the wind sensor the following code Serial3.println("$PAMTC,EN,RMC,0,10"); with the second term being the code to modify, the third being enable/ disable, and the last one being the rate of transmission. The sensor can only send 480 characters per second, if more is needed there is an option to increase the transmission rate by a factor of 8. More information can be found in the PB100 manual. Serial info: 4800 bps, 8N1 PB100 Data has a sample of data that could be received from the wind sensor. GPS Data (This is linked to from LabViewpage) Out of our GPS, we get data along the lines of DDMM.MMMM Google Earth wants format: DD.DDDDDD So we divide the minute part of the struct by 0.6. The data isactually sent to shore in format: DDDDDDDD //no decimal place If we ever have the ability to add more precision to the GPS, the LabView will need to be changed. Wiring harness 2009/2010 Data from the wind sensor first connects to the NMEA combiner box: http://boatingdirect.net/browseproducts/Furuno-AIR-033-800-NMEA-Data-Combiner.HTML, which also has the power cable wired into it. This threadtalks about connecting RS422 to RS232. In our box, the signal is then opto-isolated from RS422 to RS232 (Actisense PC-OPTO-1-A cable) and connected to a female waterproof DB9. The wind sensor has a single connection through the waterproof box, a waterproof DB9 providing power and signal connections. The pins on the male, box-mounted DB9 are as follows: 1: nc 2: pin 2 of com A(or C? where does the wind sensor connect) cable to microcontroller 3: pin 3 of com A(or C?) cable to microcontroller 4: pin 4 of com A(or C?) cable to microcontroller; OR +5V 5: ground of 12V+/-3 power to wind sensor 6: nc 7: +12V of power to wind sensor 8: nc 9: nc The pins on the female, inline DB9 are as follows: 1: nc 2: pin 2 of in-line DB9 inside NMEA combiner box; this then connects to pin 2 of the optoisolator's DB9. 3: pin 3 of in-line DB9 inside NMEA combiner box; this then connects to pin 3 of the optoisolator's DB9. 4: pin 4 of in-line DB9 inside NMEA combiner box; this then connects to pin 4 of the optoisolator's DB9. 5: ground of 12V+/-3 power to wind sensor, 'Power -' on NMEA combiner box 6: nc 7: +12V of power to wind sensor, 'Power +' on NMEA combiner box 8: nc 9: nc FROM JOEY: http://arduiniana.org/libraries/TinyGPS/ possible library to solve this problem, will research more and test soon. http://www.actisense.ca/collections/nmea-0183/products/pc-opto-3-nmea-0183-to-pc-cable This cable appears to be the simplest way to connect the wind sensor to an RS232 port. I believe it is in fact the optoisolator that we have (or perhaps a different version of it) installed in the combiner box. There is a paper data sheet for the optoisolator that we have presently floating around the bay; or I may have put that information on the wiki already. I'd recommend checking the data sheet for this and the wind sensor and draw a circuit diagram to connect them and power the wind sensor C Blair 05:42, November 19, 2010 (UTC) Actisense PC-OPTO-1-A cable is our optoisolating NMEA->RS232??? cable http://www.actisense.com/HTML/Products/NMEA%20Interfaces/NMEA_Multiplexer_4/index.php new unit =Sensors= GPS The PB100 user manual states GPS data is "accurate" to 0.0001 minutes. There are 1853 meters in a minute of latitude. 0.0001*1853 = 0.18m, or 18 centimeters. It takes about 5 minutes to obtain a GPS lock, halfway up the parking lot ramp. With fully clear skies (no buildings) it might be faster. The lock is lost at the team space door almost immediately. Wind Wind data info here =Programming= NMEA 0183 Useful article for understanding use of NMEA standard http://en.wikipedia.org/wiki/NMEA_0183 NMEA library reference for decoding NMEA strings The frequency at which different NMEA strings are sent can be edited either via the serial port, or by connecting the wind sensor to it's PC-based WeatherCaster software (see user manual). From the user manual: WeatherCaster needs to be set as follows: If you have a USB Converter, set the baud rate to 4800. If you have a Combiner, set the baud rate to 38400. Vals's Notes on Programming See also Reading and Parsing Data for information about NMEA codes and parsing. Here's some data we collect from the wind sensor: GP RMC - recommended minimum specific GNSS data $GPRMC,000309,V,,,,,,,010102,,,N*5B GP VTG - course over ground and ground speed $GPVTG,,,,,,,,,N*30 This is unused. HC HDG - heading deviation and variation $HCHDG,186.0,0.0,E,,*26 WI MWV - wind speed and angle in relation to the vessel's bow/centerline (relative(\) $WIMWV,270.0,R,0.1,N,A*27 GP GLL - Geographic position - lattitude/longitude $GPGLL,,,,,,V,N*64 This is unused. See PB100 Data for sample data. Magnetic Variation: ($--HDG supersedes $--VTG, which supersedes $--RMC) <-- external inputs, which supersedes the WeatherStation internal calculation. The internal calculation determines magnetic variation using the present position and the date: these data provided from an external GPS will supersede the data from the internal GPS. $PAMTC,EN,Q*11 // a command with it's checksum =Notes on NMEA data= NMEA data transmission can be suspended and resumed using $PAMTX,<1>*hh where the <1> argument can either be 0 or 1. 0 = temporarily suspend transmission of all NMEA sentences. (default) 1 = resume transmission =Links= User manual and install guide General NMEA description List of NMEA sentences with field descriptions Category:Hardware Category:Software Category:Sensors